<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<form action="{url:/exam/add}" method="post">
    <center>
        用户名：<input type="text" name="name" id="name" value=""/><br/>
        密码：<input type="password" name="pwd" id="pwd" value=""/><br/>
        邮箱：<input type="email" name="email" id="email" value=""/><br/>
        <input type="submit" value="注册" id="btn"/>
    </center>
</form>
</body>
</html>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
   $("#btn").click(function(){
       var name=$("#name").val();
       var pwd=$("#pwd").val();
       var email=$("#email").val();

       if(name=="" || pwd=="" || email==""){
           alert("内容不能为空！");
           return false;
       }
//       if(email="/^\w+@\w+(\.)(com|cn|net|org)$/i"){
//           alert("邮箱内容有误！");
//           return false;
//       }
   })

</script>